package com.example.stock.entity.eo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@TableName("rule")
@Data
public class RuleEo {

    @TableId(type = IdType.AUTO)
    private Integer id;

    //名称
    @TableField("ru_name")
    @NotEmpty
    private String ruName;

    //跌-跌幅起点
    @NotNull
    @TableField("dn_point")
    private Integer dnPoint;

    //跌-起始跌幅
    @NotNull
    @TableField("dn_init")
    private Double dnInit;

    //跌-跌幅增量
    @NotNull
    @TableField("dn_add")
    private Double dnAdd;

    //跌-跌幅起点
    @NotNull
    @TableField("up_point")
    private Integer upPoint;

    //跌-起始跌幅
    @NotNull
    @TableField("up_init")
    private Double upInit;

    //跌-跌幅增量
    @NotNull
    @TableField("up_add")
    private Double upAdd;

    //倍数
    @NotNull
    @TableField("top_step")
    private Integer topStep;

    @TableField(exist = false)
    private List<UpDnCalc> upDnCalcList;

    @TableField(exist = false)
    private String unitNames;

    @Data
    public static class UpDnCalc{

        private Integer trStep;

        private Double upPercent;

        private Double dnPercent;

    }

}
